import Vue from 'vue'
import Vuex from 'vuex'
import {getItem,setItem} from '@/utils/localStorage'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user:getItem('userToken')
  },
  mutations: {
    setUser(state,token){
      state.user = token
      setItem('userToken',token)
    }
  },
  actions: {
  },
  modules: {
  }
})
